﻿@model FindArtInfo.Models.PageRegisterModel
@using BusinessLayer.RegInfo.Entities
@using CommandLib
@using Resources
@using BusinessLayer.RegInfo
@{
    ViewBag.Title = "Register";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

@using (Html.BeginForm("Register", "Account", FormMethod.Post))
{
    @Html.AntiForgeryToken()
    <table width="100%" border="0" cellspacing="0" cellpadding="1">
        <tbody>
            <tr>
                <td align="left">
                    <div id="RequireFirstName"></div>
                    <table width="100%" cellspacing="2" cellpadding="4" align="center" border="0">
                    <tbody>
                        <tr align="left">
                            <td height="25" colspan="2">
                                <p>
                                    <b>@Multi.PageRegisterTitle</b><br>
                                </p>
                            </td>
                        </tr>
                        <tr align="center">
                            <td height="25" colspan="2" align="left">
                                <div align="left">
                                    <strong>&nbsp;&nbsp;&nbsp;&nbsp;@Multi.PageRegisterMessage1</strong>
                                </div>                                
                                <table width="100%" border="0" cellspacing="0" cellpadding="3">
                                    <tbody>
                                        @foreach(var item in Model.ListSubscriptions)
                                        {
                                            <tr>
                                                <td width="100px">&nbsp;&nbsp;&nbsp;&nbsp;@item.Title</td>
                                                <td>$@item.Price
                                                    @{
                                                        MarketingExtend marketing = new MarketingBL().GetMarketingCurrent(1, item.SubscriptionID);
                                                        if(marketing != null)
                                                        {
                                                            <span style="color: red">(Promotion $@Math.Round((item.Price - item.Price * marketing.Discount / 100),2))</span>
                                                        }
marketing = new MarketingBL().GetMarketingCurrent(2, item.SubscriptionID);
                                                        if(marketing != null)
                                                        {
                                                            <span style="color: red">(Promotion $@Math.Round((item.Price - item.Price * marketing.Discount / 100),2))</span>
                                                        }
                                                    }
                                                </td>
                                            </tr>
                                        }                                        
                                    </tbody>
                                </table>
                            </td>
                        </tr>
                        <tr align="center">
                            <td height="25" colspan="2" bgcolor="#525E54">
                                <font face="arial" size="2" color="#FFFFFF"><strong>@Multi.PageRegisterPersonalInfo </strong>
                                </font>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="2">
                                @Html.Raw(Server.HtmlDecode(Html.ValidationMessageFor(m=>m.MessageResultRegister).ToString()))
                            </td>
                        </tr>
                        <tr>
                            <td style="width: 100%; text-align: center; padding: 10px 0px 10px;" align="center" colspan="2">                                                                
                                <a href="~/@Utils.GetUrlByLanguage(CookiesStore.GetCookies(Constants.Cookie.COOKIE_LANGUAGE))/login-renew.html">@Html.Raw(Multi.PageRegisterExistsAccount)</a>
                            </td>
                        </tr>                        
                        <tr>
                            <td style="width: 45%" bgcolor="#FFFFFF">
                                &nbsp;&nbsp;&nbsp;&nbsp;@Multi.PageRegisterFirstName *
                            </td>
                            <td bgcolor="#FFFFFF">
                                &nbsp;&nbsp;&nbsp;&nbsp;
                                <input name="firstName" type="text" id="iptFirstName" style="width: 60%">
                            </td>                                                                
                        </tr>
                        <tr>
                            <td bgcolor="#FFFFFF">
                                &nbsp;&nbsp;&nbsp;&nbsp;@Multi.PageRegisterLastName *
                            </td>
                            <td bgcolor="#FFFFFF">
                                &nbsp;&nbsp;&nbsp;&nbsp;
                                <input type="text" name="lastName" id="iptLastName" style="width: 60%">
                            </td>
                        </tr>
                        <tr>
                            <td bgcolor="#FFFFFF">
                                &nbsp;&nbsp;&nbsp;&nbsp;@Multi.PageRegisterEmail *<br>
                                                                &nbsp;&nbsp;&nbsp;&nbsp;(@Multi.PageRegisterValidationEmail)
                            </td>
                            <td bgcolor="#FFFFFF">
                                &nbsp;&nbsp;&nbsp;&nbsp;                                
                                @Html.TextBoxFor(m =>m.Email, new { @style="width: 60%" })
                                @Html.ValidationMessageFor(m=>m.Email)
                            </td>
                        </tr>
                        <tr>
                            <td bgcolor="#FFFFFF">
                                &nbsp;&nbsp;&nbsp;&nbsp;@Multi.PageRegisterConfirmEmail *<br>
                            </td>
                            <td bgcolor="#FFFFFF">
                                &nbsp;&nbsp;&nbsp;&nbsp;                                
                                @Html.TextBoxFor(m =>m.ConfirmEmail, new { @style="width: 60%" })
                            </td>
                        </tr>
                        <tr>
                            <td bgcolor="#FFFFFF">
                                &nbsp;&nbsp;&nbsp;&nbsp;@Multi.PageRegisterCreatePass *
                            </td>
                            <td bgcolor="#FFFFFF">
                                &nbsp;&nbsp;&nbsp;&nbsp;                                
                                @Html.PasswordFor(m =>m.CreatePassWord, new { @style="width: 60%" })
                            </td>
                        </tr>
                        <tr>
                            <td bgcolor="#FFFFFF">
                                &nbsp;&nbsp;&nbsp;&nbsp;@Multi.PageRegisterCountry
                            </td>
                            <td bgcolor="#FFFFFF">
                                &nbsp;&nbsp;&nbsp;&nbsp;
                                @Html.DropDownListFor(m=>m.CountryId, new SelectList(Model.ListCountry, "ID", "CountryName"), @Multi.PageRegisterSelectCountry)
                                @Html.ValidationMessageFor(m=>m.CountryId)
                            </td>
                        </tr>
                        <tr valign="top">
                            <td bgcolor="#FFFFFF">
                                &nbsp;&nbsp;&nbsp;&nbsp;@Multi.PageRegisterHowDidYouFindUs
                            </td>
                            <td bgcolor="#FFFFFF">
                                &nbsp;&nbsp;&nbsp;&nbsp;
                                <select name="Find" id="Find" style="width: 60%">
                                    <option value="@Multi.PageRegisterFindSearch">@Multi.PageRegisterFindSearch</option>
                                    <option value="@Multi.PageRegisterFindReferral">@Multi.PageRegisterFindReferral</option>
                                    <option value="@Multi.PageRegisterFindPressArticle">@Multi.PageRegisterFindPressArticle</option>
                                    <option value="@Multi.PageRegisterFindGoogle">@Multi.PageRegisterFindGoogle</option>
                                    <option value="@Multi.PageRegisterFindEmail">@Multi.PageRegisterFindEmail</option>
                                    <option value="@Multi.PageRegisterFindPublication">@Multi.PageRegisterFindPublication</option>
                                    <option value="@Multi.PageRegisterFindOther">@Multi.PageRegisterFindOther</option>
                                </select>
                            </td>
                        </tr>
                        <tr valign="top">
                            <td bgcolor="#FFFFFF">
                                &nbsp;&nbsp;&nbsp;&nbsp;@Multi.PageRegisterSubscription
                            </td>
                            <td bgcolor="#FFFFFF">
                                &nbsp;&nbsp;&nbsp;&nbsp;
                                @Html.DropDownListFor(m=>m.SubscriptionId, new SelectList(Model.ListSubscriptions, "SubscriptionID", "Title"))
                            </td>                                
                        </tr>
                        <tr valign="top">
                            <td bgcolor="#FFFFFF">
                                &nbsp;&nbsp;&nbsp;&nbsp;@Html.Raw(Multi.PageRegisterTypePay)
                            </td>
                            <td bgcolor="#FFFFFF">
                                <table>
                                    <tr>
                                        <td valign="middle">&nbsp;&nbsp;&nbsp;&nbsp;<input type="radio" name="TypePay" value="@Constants.TypePay.ONE_PAY" checked="checked"/></td>
                                        <td><img src="/Content/Images/1359_onepay_partner.jpg" alt="findartinfo.com"></td>
                                    </tr>
                                    <tr>
                                        <td valign="middle">&nbsp;&nbsp;&nbsp;&nbsp;<input type="radio" name="TypePay" value="@Constants.TypePay.PAY_PAL"/></td>
                                        <td><img src="/Content/Images/paypal_logo.jpg" alt="findartinfo.com"></td>
                                    </tr>
                                </table>                                                                                                                                                                                                
                            </td>
                        </tr>
                        <tr>
                            <td bgcolor="#FFFFFF">
                                &nbsp;&nbsp;&nbsp;&nbsp;@Multi.PageRegisterCouponCode
                            </td>
                            <td bgcolor="#FFFFFF">
                                &nbsp;&nbsp;&nbsp;&nbsp;                                
                                @Html.TextBoxFor(m=>m.CouponCode, new { @style="width: 60%" })
                            </td>
                        </tr>                            
                        <tr valign="top">
                            <td bgcolor="#FFFFFF">
                            </td>
                            <td bgcolor="#FFFFFF">
                                &nbsp;&nbsp;&nbsp;
                                @Html.CheckBoxFor(m=>m.Tern)
                                <span class="style2">                                    
                                    <a href="~/@Utils.GetUrlByLanguage(CookiesStore.GetCookies(Constants.Cookie.COOKIE_LANGUAGE))/terms-conditions.html">@Multi.PageRegisterConfirm</a>
                                </span>
                            </td>
                        </tr>
                        <tr valign="top">
                            <td bgcolor="#FFFFFF">&nbsp;</td>
                            <td bgcolor="#FFFFFF" style="padding-left: 20px;">
                                @Html.Raw(Multi.PageRegisterMessage2)
                            </td>
                        </tr>
                        <tr valign="top">
                            <td bgcolor="#FFFFFF">&nbsp;</td>
                            <td bgcolor="#FFFFFF">&nbsp;&nbsp;&nbsp;&nbsp;
                                <input type="submit" name="payNow" value="@Multi.PageRegisterSubmit" class="knap">
                                <input type="button" name="Cancel" value="@Multi.PageRegisterCancel" onclick=" CanceOnclick(); " onmouseover=" co(this, 'in'); " onmouseout=" co(this,'out');" class="knap">
                            </td>
                        </tr>
                        <tr valign="top">
                            <td colspan="2" bgcolor="#FFFFFF">
                                <table width="100%" height="100%">
                                    <!--DWLayoutTable-->
                                <tbody>
                                    <tr>
                                        <td height="47" colspan="3" valign="middle">
                                                <!--DWLayoutEmptyCell-->
                                                &nbsp;
                                        </td>
                                    </tr>
                                </tbody>
                                </table>                                
                                </td>
                            </tr>
                        </tbody>
                    </table>
                </td>
            </tr>
        </tbody>
    </table>
}
